﻿using UnityEngine;
using System.Collections;

namespace Game.UI
{
    /// <summary>
    /// UI管理器的基类，提供UI的Canvas关闭、显示时的事件监听
    /// </summary>
	public class UIManagerBase : MonoBehaviour 
	{
        
        /// <summary>
        /// 管理UI的Canvas
        /// </summary>
        [SerializeField]protected Canvas m_uiCanvas;
        
		//---------------------------------------------------------------------------
		//				Public area
		//---------------------------------------------------------------------------
		#region Public area

		#endregion

        #region protect area

        /// <summary>
        /// 隐藏整个canvas,
        /// </summary>
        protected virtual void HideCanvas()
        {
            m_uiCanvas.gameObject.SetActive(false);
        }

        /// <summary>
        /// 显示整个canvas
        /// </summary>
        protected virtual void ShowCanvas()
        {
            m_uiCanvas.gameObject.SetActive(true);
        }
        #endregion


    }
}